package com.wangsd.web.face.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wangsd.web.face.entity.TOrder;
import com.wangsd.web.face.entity.TOrderExt;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author generator
 * @since 2019-09-23
 */
public interface TOrderMapper extends BaseMapper<TOrder> {

    IPage<TOrder> selectListXml(Page<TOrder> page, @Param("order") TOrder order, @Param("code") String code);

    List<TOrder> selectListXml(@Param("order") TOrder order, @Param("code") String code);

    Map selectListStatisticsXml(@Param("order") TOrder params, @Param("code") String code);

    TOrderExt selectCloseAccountStatistics(@Param("order") TOrder params);

    TOrder selectLastByUserIdAndDeviceNoXml(@Param("storeUserId") Long storeUserId, @Param("deviceNo") String deviceNo);

    IPage<TOrder> selectListByDeviceNoAndTimeXml(Page<TOrder> page, @Param("deviceNo") String deviceNo, @Param("beginTime") Date beginTime, @Param("endTime") Date endTime, @Param("outTradeNo") String outTradeNo);

    List<TOrder> selectListByDeviceNoAndTimeXml(@Param("deviceNo") String deviceNo, @Param("beginTime") Date beginTime, @Param("endTime") Date endTime, @Param("outTradeNo") String outTradeNo);

    IPage<Map> selectStatisticsListByMerchant(Page<Map> page, @Param("order") TOrder order);

    IPage<Map> selectStatisticsListByStore(Page<Map> page, @Param("order") TOrder order);
}